﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;

namespace HCQ2UI
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            //routes.MapRoute(
            //    name: "Localization",
            //    url: "{lang}/{controller}/{action}/{id}",// 带有参数的 URL
            //    constraints: new { lang = "zh-CN|en-US" }, //限制可输入的语言项
            //    defaults: new { lang = "zh-CN", controller = "SysLogin", action = "Login", id = UrlParameter.Optional },//参数默认值
            //    namespaces: new string[1] { "HCQ2UI_Logic" }
            //);

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new { controller = "SysLogin", action = "Login", id = UrlParameter.Optional },
                namespaces:new string[1] { "HCQ2UI_Logic" }
            );
        }
    }
}
